<%@ page pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
<%@ include file="../../inc/taglib.jsp"%>
<table id="list-table">
	<thead>
		<tr>
			<th style="width: 10pt">#</th>
			<th style="width: 80pt">角色名称</th>
			<th style="width: 150pt">角色备注</th>
			<th>功能权限</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach var="r" items="${ roles }" varStatus="vs">
			<tr>
				<th class="text-center">${ vs.count }</th>
				<td><c:if test="${ loginUser.grantedPaths['/rbac/role/del'] }">
						<a href="javascript:;" class="btn-del hover-show" data-id="${ r.id }" title="删除"><i class="fa fa-remove"></i></a>
					</c:if><span>${ r.name }</span> <c:if test="${ loginUser.grantedPaths['/rbac/role/save'] }">
						<a href="javascript:;" class="btn-edit hover-show" data-id="${ r.id }" title="修改"><i class="fa fa-edit"></i></a>
					</c:if></td>
				<td>${ r.remark }</td>
				<td style="padding: 4px"><c:forEach var="module" items="${ r.actionDescription }">
						<div class="btn btn-default btn-xs">${ module.key }&nbsp;<i class="fa fa-angle-double-right"></i>
							<c:forEach var="ctrl" items="${ module.value }">
								 ${ ctrl.key }<span class="badge">${ ctrl.value }</span>
							</c:forEach>
						</div>
					</c:forEach></td>
			</tr>
		</c:forEach>
	</tbody>
</table>

